<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>修改公告</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport"
          content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi"/>
    <link rel="shortcut icon" href="/static/favicon.ico" type="image/x-icon"/>
    <link rel="stylesheet" href="/static/css/font.css">
    <link rel="stylesheet" href="/static/css/xadmin.css">
    <script type="text/javascript" charset="utf-8" src="/static/js/jquery-1.11.3.min.js"></script>
    <script src="/static/lib/layui/layui.js" charset="utf-8"></script>
    <script type="text/javascript" src="/static/js/xadmin.js"></script>
    <script type="text/javascript" charset="utf-8" src="/static/ueditor/ueditor.config.js"></script>
    <script type="text/javascript" charset="utf-8" src="/static/ueditor/ueditor.all.min.js"></script>
    <script type="text/javascript" charset="utf-8" src="/static/ueditor/lang/zh-cn/zh-cn.js"></script>
    <!-- 让IE8/9支持媒体查询，从而兼容栅格 -->
    <!--[if lt IE 9]>
    <script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
    <script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
    <script>
        $(function () {
            layui.use(['form', 'layer'], function () {
                $ = layui.jquery;
            });

            var ue = UE.getEditor('editor');
        });


        function add_dwdwd() {
            var data = $("#add_cedew").serialize();
            $.post("/admin/notice/update",
                data,
                function (data) {
                    layer.alert(data.msg, {icon: 6}, function () {
                        window.parent.location.reload();
                        var index = parent.layer.getFrameIndex(window.name);
                        parent.layer.close(index);
                    });
                }, "json");
        }


    </script>
</head>
<body>
<div class="x-body">
    <form class="layui-form" id="add_cedew" onsubmit="return false;">
        <input type="hidden" name="id" value="${bean.id!}">
        <input type="hidden" name="uid" value="${bean.uid!}">
        <div class="layui-form-item">
            <div class="layui-inline layui-col-md5 layui-col-md-offset1">
                <label class="layui-form-label">标题</label>
                <div class="layui-input-inline">
                    <input type="text" name="title" value="${bean.title!}"  autocomplete="off" class="layui-input" >
                </div>
            </div>
            <div class="layui-inline layui-col-md5">
                <label class="layui-form-label">排序</label>
                <div class="layui-input-inline">
                    <input type="number" name="orderby" value="${bean.orderby!}" autocomplete="off" class="layui-input " >
                </div>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label"><span class="x-red">*</span>是否显示</label>
            <div class="layui-input-block">
                <input type="radio" name="status" value="1" lay-skin="primary" title="显示" <%if(bean.status! ==1){%>checked="checked"<%}%> >
                <input type="radio" name="status" value="2" lay-skin="primary" title="不显示" <%if(bean.status! ==2){%>checked="checked"<%}%>>
            </div>
        </div>
        <div class="layui-form-item layui-form-text layui-col-md11 layui-col-md-offset1">
            <label class="layui-form-label">公告内容</label>
            <div class="layui-input-block">
                <SCRIPT name="context" id="editor" type="text/plain" style="width:100%;height:200px;">${bean.context!}</SCRIPT></div>
        </div>
        <div class="layui-form-item">
            <label for="editor" class="layui-form-label">
            </label>
            <button class="layui-btn" onclick="add_dwdwd()">
                保存
            </button>
        </div>
    </form>
</div>
</body>
</html>